nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

javascript/Execution Context

The environment JavaScript builds before it runs a single line of your function.

8 QuestionsAdvancedHigh Priority ~30 min read

Every time a function is called, JavaScript creates an execution context for it — a self-contained environment holding that call's variables, its scope chain, and the value of this. There are really two phases to this: a creation phase, where variable and function declarations get hoisted and memory is allocated before any code runs, and an execution phase, where the code actually runs top to bottom and values get assigned.

These contexts don't exist in isolation — they stack. The global execution context sits at the bottom, and every function call pushes a new context onto the call stack, which gets popped off once the function returns. Each context also carries a reference to the context it was defined in (not called from), which is exactly what makes lexical scoping and closures work — a function can still reach variables from a context that's already been popped off the stack.

What you'll walk away knowing

The difference between the creation phase and execution phase of a context, and what hoisting actually is
How the call stack relates to execution contexts, and what happens on each function call/return
Why scope is determined by where a function is defined (lexical scope), not where it's called
How execution context underpins closures — why a function can outlive the context it was created in
1How does the scope chain work internally?Intermediate2What is hoisting, and how does the engine implement it?Intermediate3How do closures work at the engine level?Advanced4What is the difference between execution context and scope?Intermediate5What is the Call Stack?Intermediate6List the phases of the JavaScript Execution Context.Beginner7List the types of Execution Context in JS.Beginner8What is the Execution Context?Intermediate
All Topics
1
Basics
Data Types
Functions
Objects
2
Engine
JIT
V8
Event Loop and Runtime
Concurrency and Threading
Bytecode and Parsing
Execution Context
Garbage Collector
3
this
Call Apply Bind
Closure
Error Handling
4
String Operations
Array Operations
Iterator and Generator
Modules
5
Events
Promises
Web Workers
Web Sockets
6
Functional Programming
Currying
Higher Order Functions
Memoisation
7
ES6 Classes
ES6
PWA
Web Assembly
Browser APIS
8
Security
Code
Polyfills
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.